var api = require('../../util/api.js');
Page({
  data: {

  },
  onLoad: function () {
    this.setData({
      examineId: api.chain().examineId,
      examineName: api.chain().examineName,
      wx1001: api.hasPerm('ljjd:wx:10:01'),
      wx1002: api.hasPerm('ljjd:wx:10:02'),
      wx1003: api.hasPerm('ljjd:wx:10:03'),
      wx1004: api.hasPerm('ljjd:wx:10:04'),
      wx1005: api.hasPerm('ljjd:wx:10:05'),
      wx1006: api.hasPerm('ljjd:wx:10:06'),
      wx1007: api.hasPerm('ljjd:wx:10:07'),
      wx1008: api.hasPerm('ljjd:wx:10:08')
    })
  },
  onShow: function () {

  },
  //现场管理
  goXCGL() {
    api.chain({
      khtype: 'xcgl'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //综合考核
  goZHKH() {
    api.chain({
      khtype: 'zhkh'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //劳动纪律
  goLDJL() {
    api.chain({
      khtype: 'ldjl'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //监督互评
  goJDHP() {
    api.chain({
      judgeId: api.getSysUser().userId,
      khtype: 'jdhp'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //施工单位评分
  goSGDWPF() {
    api.chain({
      judgeId: api.getSysUser().userId,
      khtype: 'sgdwpf'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //整改单份数
  goZGDFS() {
    api.chain({
      khtype: 'zgd'
    });
    api.get(api.url.wtmxbList, {
      examineId: api.chain().examineId
    }).then(res => {
      wx.navigateTo({
        url: `../player/list`
      })
    })
  },
  //发现问题数量
  goWTSL() {
    api.chain({
      khtype: 'wtsl'
    });
    api.get(api.url.wtmxbList, {
      examineId: api.chain().examineId
    }).then(res => {
      wx.navigateTo({
        url: `../player/list`
      })
    })
  },
  //罚款单数量
  goFDFS() {
    api.chain({
      khtype: 'fdfs'
    });
    api.get(api.url.gcfkbList, {
      examineId: api.chain().examineId
    }).then(res => {
      wx.navigateTo({
        url: `../player/list`
      })
    })
  }

});